/*
 * @Description:
 *
 * @Author: guichengcai<guichengcai>
 * @Date: 2023-07-03 17:10:22
 * @FilePath: /yuxiuproweb/src/api/reportforms/sale/index.js
 */
import request from "@/utils/request";

// 查询窗帘销售记录列表 type=1
export function listRecord(query) {
  return request({
    url: "/qb/order/list", //"/pro/PurchaseOrderItem/list",
    method: "get",
    params: query,
  });
}
//新增【零裁】-查询（生产任务单）
export function getlistlc(query) {
  return request({
    url: "/qb/task/list",
    method: "get",
    params: query,
  });
}
//新增【欠料】-查询（生产任务单面料状态为1欠料）
export function getlistql(query) {
  return request({
    url: "/qb/task/list", //"/qb/order/shortageList",
    method: "get",
    params: query,
  });
}
//新增【库存】-查询
export function getlistkc(query) {
  return request({
    url: "/qb/setting/list",
    method: "get",
    params: query,
  });
}
// 新增库存、零裁、欠料
export function addkc(data) {
  return request({
    url: "/qb/order",
    method: "post",
    data: data,
  });
}
// 审核
export function sumbitapply(data, choose) {
  return request({
    url: "/qb/PurchaseOrderItem/buyapply/" + data + "/" + choose,
    // (choose == "false" ? "/" + choose : ""),
    method: "get",
  });
}
// 修改申购单Item
export function updatekc(data) {
  return request({
    url: "/qb/PurchaseOrderItem",
    method: "put",
    data: data,
  });
}
// 删除申购单Item
export function deletekc(purchaseOrderItemIds) {
  return request({
    url: "/qb/PurchaseOrderItem/" + purchaseOrderItemIds,
    method: "delete",
  });
}
// 根据请购单itemid获取信息
export function getapplylistitem(purchaseOrderItemId) {
  return request({
    url: "/qb/PurchaseOrderItem/" + purchaseOrderItemId,
    method: "get",
  });
}
